export const loadFilters = (Vue) => {
  Vue.filter('num2Money', function(num) {
      var result = [],counter = 0;
      num = (num || 0).toString().split('');
      for (var i = num.length - 1; i >= 0; i--) {
        counter++;
        result.unshift(num[i]);
        if (!(counter % 3) && i != 0) {
          result.unshift(',');
        }
      }
     
      // 处理有小数点的情况
      if(num.indexOf('.') != -1){
        result.splice(result.indexOf('.')-1,1)
      }
      return result.join('');
  });
};
